﻿using Microsoft.VisualBasic;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
/// <summary>
/// Classe qui permet de trie une liste de ListObject
/// </summary>
/// <remarks></remarks>
/// 
namespace Framework.Data.Core
{
    public class ListObjectComparer : IComparer
    {

        /// <summary>
        /// Fonction qui compare 2 objets ListObject pour le tri
        /// </summary>
        /// <param name="x">ListObject1</param>
        /// <param name="y">ListObject2</param>
        /// <returns>Integer</returns>
        /// <remarks></remarks>
        public int Compare(object x, object y)
        {
            return string.Compare(((ListObject)x).DisplayMember, ((ListObject)y).DisplayMember, true);
        }
    }
}